<?php
/* @var $this yii\web\View */
use metronic\widgets\ActiveForm;
use yii\helpers\Html;

if (Yii::$app->session->getFlash('updated')) {
    \metronic\assets\ToastrAsset::register($this);
    $this->registerJs('toastr.success("保存成功", "", {timeOut: 1000});');
}

$this->title = '设置';
?>

<div class="portlet light bordered">
    <div class="portlet-title">
        <div class="caption">
            <span class="caption-subject bold uppercase"><?= Html::encode($this->title) ?></span>
<!--            <p style="color: red;font-size: 14px;">注意:请严格按照文档说明填写设置信息,因设置问题而带来的损失有用户全部承担</p>-->
        </div>
    </div>
    <div class="portlet-body">
        
        <?php 

        $form = ActiveForm::begin();

        foreach ($settings as $index => $setting) {
            $field = $form->field($setting, "[$index]value")->textInput(['maxlength' => true]);
            echo $field;
        }

        ActiveForm::end();

        ?>

    </div>
</div>
